<template>
  <div>
    <p>flvjs</p>
    <!-- <video id="videoElement"></video> -->

    <p>easy-player</p>
    <!-- <easy-player ref="videoplay" :video-url="url"></easy-player> -->
    <p>video.js</p>
    <video-player
    :src="url"
     class="width:300px;height:200px;"
    poster="/your-path/poster.jpg"
    controls
   
  />
  <!-- :loop="true"
    :volume="0.6"
    @mounted="changss"
    @ready="changss"
    @play="changss"
    @pause="changss"
    @ended="changss"
    @seeking="changss" -->
</div>

</template>

<script>
// import flvjs from "flv.js"


// import EasyPlayer from '@easydarwin/easyplayer'
  import { VideoPlayer } from '@videojs-player/vue'
export default {
    methods:{
        changss(){

        }
    },
    data(){
        return {
            url:'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8' 


        }
    },
    created(){
       
    },
    components: {
      VideoPlayer
         // EasyPlayer
    },
 

    mounted(){
    //     if (flvjs.isSupported()) {
    //     const videoElement = document.getElementById('videoElement');
    //     const flvPlayer = flvjs.createPlayer({
    //         type: 'flv',
    //         url: 'rtmp://live.hkstv.hk.lxdns.com/live/hks1'
    //     });
    //     flvPlayer.attachMediaElement(videoElement);
    //     flvPlayer.load();
    //     flvPlayer.play();
    // }
    }

}
</script>

<style>

</style>
<!-- initPlayer	初始化播放器
destroyPlayer	销毁播放器
switchVideo	播放开关
switchAudio	静音开关
fullscreen	全屏
exitFullscreen	退出全屏
changeStretch	视频拉伸模式
snapshot	保存快照
switchRecording	录像开关 -->
